#ifndef __davinci_emac_h__
#define __davinci_emac_h__





#define CONFIG_SOC_DM365

#include "emac_defs.h"


#define EMAC_FULL_SIZE			(0x4000)
#define EMAC_WRAPPER_REG_SIZE		(sizeof( ewrap_regs))
#define EMAC_WRAPPER_RAM_SIZE		(0x1000)
#define EMAC_MDIO_REG_SIZE		(sizeof( mdio_regs))


// copied from addressmap.h to avoid including 
#define ADDR_RANGE_READ  1            // Bus read
#define ADDR_RANGE_WRITE 2           // Bus write
#define ADDR_RANGE_DEL   3           // delete an address range



int davinci_emac_init();
void davinci_emac_do_clock();

void davinci_emac_handler(
	  void *lpContext,
	  int op, 
	  unsigned int dwAddress,           // start dwAddress on 32bit bus
	  char *pszBuff,           // optional 
	  unsigned int nBytes );            // in or out buffer


#endif 